B
    ±,—a*
  ã               @   s8   d dl Zd dlmZ d dlmZ d dlmZ dd„ Z	dS )é    N)Úcumtrapz)Úmake_interp_splinec             C   s
  d}d}d}|| }|||  }	d}
d}t  | dk¡d d }t  | dk¡d d }t  |d|… ¡}t  |||… ¡| }t|| ƒ}t| d	 |
 d
|	 |  | ƒ}t||
 d
|	 |  | ƒ}|||… ||  }|||… ||  }|||… ||  }|| | }t  |¡}|| }|| }|| }| ||… }tjdd� tj| ||… | |  d |||… d dd� t ddd¡ t 	d¡ tjdd� t || |  |¡ tj|| |  |dd� tj|| |  |dd� t ddd¡ t 
d¡ t d¡ t 	d¡ d S )Nix  i@  iF  é<   gyËÕX@i   r   i@  é   g       @)é
   r   )Úfigsizeiè  g    €„.AÚred)Úcoloré   gš™™™™™É?zFigure10-1.pngÚorangeéÈ   zCa flux normalizedz	Time (ms)zFigure10-2.png)ÚnpÚwhereÚargminr   ÚamaxÚpltÚfigureÚplotÚxlimÚsavefigÚylabelÚxlabel)ÚtimeÚIupÚINaCaÚIpCaZCaÚV_totÚVc_tenTÚVSR_tenTÚ
V_tot_tenTÚVcÚCmÚFZinds_time_800Zinds_time_1600Zinds1Zinds2Z	intJsercaZ
intIncx_caZintIpcaZ
fluxJsercaZfluxIncx_caZfluxIpcaZ
flux_totalÚrefZfluxJserca_normZfluxIncx_ca_normZfluxIpca_normZ	Time_flux© r$   úkC:\Users\nafs080\work\codes\python_packages\python-opencor\src\PMR\702\Components\New folder\ca_analysis.pyÚca_analysis   sH    
 
0



r&   )
Únumpyr   Úscipy.integrater   Úmatplotlib.pyplotÚpyplotr   Úscipy.interpolater   r&   r$   r$   r$   r%   Ú<module>   s   